﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.IO;
using System.Reflection;
using Opalis.QuickIntegrationKit;
using System.Management;

namespace Erlacher.Opalis.VMMExtended
{
    [OpalisObject("Create VM GuidId", ShowFilters = false)]
    public class CreateVMGuid : IOpalisObject 
    {
        private Settings settings;


        [OpalisConfiguration]
        public Settings Settings
        {
            set { settings = value; }
            get { return settings; }
        }


        public void Design(IOpalisDesigner designer)
        {
            designer.AddOutput("VMGuidId");
           
        }

        public void Execute(IOpalisRequest request, IOpalisResponse response)
        {
            Dictionary<string, object> publishedData = new Dictionary<string, object>();

            string s_guid = Guid.NewGuid().ToString();

            publishedData.Add("VMGuidId", s_guid);


            response.Publish(publishedData);
            
             
        }
    }
}